<?
//先通过dirname(__FILE__)获取到当前文件绝对路径，然后再按具体情况用..去控制找到templates文件夹下的header.php
include dirname(__FILE__)."/../templates/header.php";
?>
<title>后台管理系统</title>
<link href="http://localhost/abhx/css/TabPanel.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="http://localhost/abhx/js/wdScrollTab/Fader.js"></script>
<script type="text/javascript" src="http://localhost/abhx/js/wdScrollTab/TabPanel.js"></script>
<script type="text/javascript" src="http://localhost/abhx/js/wdScrollTab/Math.uuid.js"></script>
<script type="text/javascript" >

var tabpanel ;

$(document).ready(function(){

    tabpanel = new TabPanel({
        renderTo:'mainTabDiv',
		width:'85%',
        height:'500px',
		active:0,
		items:[]
    });

	 //使菜单项点中以后得到cur的样式
	$("#menuDiv a").click(
		function(){
			$("#menuDiv a").attr("class","");
			$(this).attr("class","cur");
		}
	);

});

function addTab(id,title,url){
	tabpanel.addTab({id: id ,
		title: title ,
		html:"<iframe src=\"" + url + "\" width=\"100%\" height=\"460px\" frameborder=\"0\"></iframe>",
		closable: true,
		disabled:false
	 });
}
</script>

</head>
<body>
 <div id="banner">
	<h2>后台管理系统</h2>
	<div id="bannerLogout"><a href='<?php echo base_url() . "index.php/admin/doLogout"?>'>登出</a></div>
	<div style="clear:both;"></div>
 </div>
 <div id="menuDiv" class="menuDiv">
	<div id="menuDivHead" class="menuDivHead"></div>
	<ul>
		<li>
			<span>网站设置</span>
		</li>
		<li>
			<a href="javascript:addTab('admin','管理员设置','')">管理员设置</a>
		</li>
		<li>
			<a href="javascript:addTab('site_info','网站信息设置','<? echo base_url() ?>index.php/data_site_info/toEdit/no')">网站信息设置</a>
		</li>
		<li>
			<a href="javascript:addTab('banner_pic','banner图片管理','')">banner图片管理</a>
		</li>
		<li>
			<a href="javascript:addTab('data','数据管理','')">数据管理</a>
		</li>
		<li>
			<span>内容管理</span>
		</li>
		<li>
			<a href="javascript:addTab('category','栏目管理','<? echo base_url() ?>index.php/category')">栏目管理</a>
		</li>
	</ul>
 </div>
 <div id="mainTabDiv" ></div>

</body>
</html>
